/* $RCSFile: AddonNiceUserProfile.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/ADNCRM.Authentication/AddonNiceUserProfile.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:27  christian.surieux
 *   Added Log to All cs files
 */

using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
using System.Web.Profile;
using AddonNice.Security;

namespace AddonNice.Authentication
{
	/// <summary>
	/// Custom Profile class adapted to CRM
	/// </summary>
	public class AddonNiceUserProfile : ProfileBase
	{
		public AddonNiceUserProfile()
		{
            if ( SecurityTraceSwitch.Sw.TraceVerbose )
                Trace.WriteLine( "[V]AddonNiceProfileProvider Ctor CALLED.",SecurityTraceSwitch.Sw.Info);
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public int PortalID
		{
			get { return (int)base["PortalID"]; }
			set { base["PortalID"] = value; }
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public int typeCode
		{
			get { return (int)base["typeCode"]; }
			set { base["typeCode"] = value; }
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public string typeName
		{
			get { return (string)base["typeName"]; }
			set { base["typeName"] = value; }
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public string EMail
		{
			get { return (string)base["EMail"]; }
			set { base["EMail"] = value; }
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public Guid CrmImpersonateId
		{
			get { return (Guid)base["CrmImpersonateId"]; }
			set { base["CrmImpersonateId"] = value; }
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public string portalAlias
		{
			get { return base["portalAlias"].ToString(); }
			set { base["portalAlias"] = value; }
		}

		[SettingsAllowAnonymous(true)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public string BillingCountry
		{
			get { return base["BillingCountry"].ToString(); }
			set { base["BillingCountry"] = value; }
		}
    
		[SettingsAllowAnonymous(false)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public string ProfilePassword
		{
			get { return (string)base["ProfilePassword"]; }
			set { base["ProfilePassword"] = value; }
		}

		[SettingsAllowAnonymous(false)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public bool ProfileIsDesactivated
		{
			get { return (bool)base["ProfileIsDesactivated"]; }
			set { base["ProfileIsDesactivated"] = value; }
		}

		[SettingsAllowAnonymous(false)]
		[ProfileProvider("AddonNiceProfileProvider")]
		public bool ProfileIsValidated
		{
			get { return (bool)base["ProfileIsValidated"]; }
			set { base["ProfileIsValidated"] = value; }
		}
	}
}

